package cn.anosi.service.auth.impl;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import cn.anosi.entity.auth.Role;
import cn.anosi.page.PageResponseBean;
import cn.anosi.page.Pager;
import cn.anosi.service.auth.RoleService;
import cn.anosi.service.base.impl.BaseServiceImpl;

@Service
public class RoleServiceImp extends BaseServiceImpl<Role> implements RoleService {

	@Override
	public Role save(Role entity) {
		return roleRepository.save(entity);
	}

	@Override
	public int delete(Serializable id) {
		return roleRepository.deleteRole(id);
	}

	@Override
	public Role getById(Serializable id) {
		return roleRepository.getById(id);
	}

	public List<Role> findAll() {
		return roleRepository.findByIsDel("0");
	}
	
	@Override
	public int batcahDel(List ids) {
		return roleRepository.batcahDel(ids);
	}

	@Override
	public List<Role> list() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public PageResponseBean<Role> list(Pager pager) {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int lock(Serializable id, Integer status) {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int batchSave(ArrayList<Role> list) {
		// TODO Auto-generated method stub
		return 0;
	}
}
